package com.cpi.cornpp.common.files.dto;
/**
 * Corn Grind Data Access Object
 * @author Edgar Joao
 * @see SAPComponentDTO
 */
public class SAPComponentCornGrindDTO implements SAPComponentDTO{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 623316822342064369L;
	private String plant;
	private int year;
	private int month;
	private double grind;
	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	public boolean equals(Object object) {
		boolean equal = false;
		SAPComponentCornGrindDTO sapComponentCornGrindDTO = null;
		if( this == object ){
			equal = true;
		}else{
			if( this instanceof SAPComponentCornGrindDTO ){
				sapComponentCornGrindDTO = (SAPComponentCornGrindDTO)object;
				if( this.hashCode() == sapComponentCornGrindDTO.hashCode() ){
					equal = true;
				}
			}
		}
		return equal;
	}
	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		int hash = 0;
		hash =  ( this.plant != null ? this.plant.hashCode() : 0 );
		hash += new Integer(this.year).hashCode();
		hash += new Integer(this.month).hashCode();
		hash += new Double(this.grind).hashCode();
		return hash;
	}
	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		StringBuffer toStringValue = null;
		toStringValue = new StringBuffer(0);
		toStringValue.append(getClass().getName());
		toStringValue.append(STRING_COLON);
		toStringValue.append(this.plant);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.year);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.month);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.grind);
		toStringValue.append(STRING_COLON);		
		return toStringValue.toString();
	}	
	public String getPlant() {
		return plant;
	}
	public void setPlant(String argPlant) {
		plant = argPlant;
	}
	public int getYear() {
		return year;
	}
	public void setYear(int argYear) {
		year = argYear;
	}
	public int getMonth() {
		return month;
	}
	public void setMonth(int argMonth) {
		month = argMonth;
	}
	public double getGrind() {
		return grind;
	}
	public void setGrind(double argGrind) {
		grind = argGrind;
	}
		
}
